package snake.factory;


import snake.common.Constant;
import snake.model.Food;

import java.util.Random;

public class FoodFactory {
    public static Food getFood() {
        Random r = new Random();
        int x = r.nextInt(Constant.GRID_X_COUNT);
        int y = r.nextInt(Constant.GRID_Y_COUNT);
        return new Food(x * Constant.GRID_SIZE, y * Constant.GRID_SIZE);
    }
}
